﻿@{
    //轻量模式
    var isLightLayout = Request.QueryString["lightLayout"] == "1";
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>@ViewBag.Title</title>
    @*<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>*@
    @*加载自定义样式*@
    @if (IsSectionDefined("Styles"))
    {@RenderSection("Styles", required: false)}

    @*加载主体样式*@
    @Styles.Render("~/font-awesome/css")
    @Styles.Render("~/Content/css")
    @Styles.Render("~/plugins/toastrStyles")
    @Styles.Render("~/plugins/sweetalertStyles")
</head>
<body>
    @if (isLightLayout)
    {
        <!-- Wrapper-->
        <div id="wrapper">
            <!-- Page wraper -->
            <div id="page-wrapper" style="margin:0 0 0 0;display:none;" class="gray-bg">
                <div class="wrapper wrapper-content animated fadeInRight" style="padding-bottom:0;">
                    <!-- Main view  -->
                    @RenderBody()
                </div>
            </div>
            <!-- End page wrapper-->
        </div>
    <!-- End wrapper-->
    }
    else
    {
        <!-- Wrapper-->
        <div id="wrapper">
            @*左侧导航菜单*@
            @{Html.RenderAction("Menus", "Modules");}
            @*@Html.Partial("_Navigation")*@
            <!-- Page wraper -->
            <div id="page-wrapper" class="gray-bg">
                <!-- Top Navbar -->
                @Html.Partial("_TopNavbar")
                <div id="mainBody">
                    <!-- Main view  -->
                    @RenderBody()
                </div>
                <!-- Footer -->
                @Html.Partial("_Footer")
            </div>
            <!-- End page wrapper-->
        </div>
    }

    <!-- End wrapper-->
    @*加载主要脚本*@
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/signalR")

    @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/plugins/slimScroll")
    @Scripts.Render("~/bundles/inspinia")
    @Scripts.Render("~/plugins/toastr")
    @Scripts.Render("~/bundles/jquery.blockUI")
    @Scripts.Render("~/plugins/sweetalert")
    @Scripts.Render("~/plugins/spin")
    @Scripts.Render("~/bundles/knockout")
    <script src="~/Scripts/plugins/layer/layer.js"></script>
    @Scripts.Render("~/signalr/hubs")
    @*Magicodes.WeiChat JS框架*@
    @Scripts.Render("~/bundles/nwc")
    @Scripts.Render("~/components/notify")
    <script>
        mwc.log.level =@(HttpContext.Current.IsDebuggingEnabled ? "mwc.log.levels.DEBUG" : "mwc.log.levels.WARN");
    </script>
    @if (isLightLayout)
    {
        <script>
            if ($('div.page-heading').length>0) {
                $('div.page-heading').remove();
            }
            $('#page-wrapper').show();
            $('nav').show();
        </script>
    }
    else
    {
        <script>
            if (self!=parent) {
                if ($('div.page-heading').length>0) {
                    $('div.page-heading').remove();
                }                
                $('nav').remove();
                $('#page-wrapper').show().css('margin','0 0 0 0');
            }else {
                $('nav').show();
            }
            ko.applyBindings({},document.getElementById('topLoginPartial'));
        </script>
    }
    @*加载自定义脚本*@
    @RenderSection("scripts", required: false)
</body>
</html>
